package com.kuaimacode.kframework.mybatis.models.coupon;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author Administrator
 * @date 2019/03/25
 */
@TableName("coupon_info")
@Data
public class CouponInfo implements Serializable {
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;
	@ApiModelProperty(value = "优惠券名称")
	@TableField("name")
	private String name;
	@ApiModelProperty(value = "优惠券类型")
	@TableField("type")
	private Integer type;
	@ApiModelProperty(value = "最低使用金额")
	@TableField("min_goods_amount")
	private BigDecimal minGoodsAmount;
	@ApiModelProperty(value = "优惠金额")
	@TableField("amount")
	private BigDecimal amount;
	@ApiModelProperty(value = "")
	@TableField("create_at")
	private Date createAt;
	@ApiModelProperty(value = "")
	@TableField("create_by")
	private Long createBy;
	@ApiModelProperty(value = "优惠券状态")
	@TableField("state")
	private Integer state;
	@ApiModelProperty(value = "使用范围大类")
	@TableField("use_scope")
	private Integer useScope;
	@ApiModelProperty(value = "使用范围小类")
	@TableField("use_scope_child_type")
	private Integer useScopeChildType;

	@ApiModelProperty(value = "描述")
	@TableField("descs")
	private String descs;
	@ApiModelProperty(value = "使用开始时间")
	@TableField("use_start_time")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date useStartTime;
	@ApiModelProperty(value = "使用截止日期")
	@TableField("use_end_time")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date useEndTime;
}
